package com.weimob.mcloud.wechatwork.customer.convertor.employee;

import com.weimob.mcloud.wechatwork.core.entity.relation.employee.EmployeeIdentity;
import com.weimob.mcloud.wechatwork.customer.service.user.module.bo.employee.EmployeeIdentityBO;

import java.util.Objects;

/**
 * @author jun.liu05
 * @since 1.0
 */
public class EmployeeConvertor {

    public static EmployeeIdentityBO getEmployeeIdentityBO(EmployeeIdentity employeeIdentity) {
        if (Objects.isNull(employeeIdentity)){
            return null;
        }

        EmployeeIdentityBO employeeIdentityBO = new EmployeeIdentityBO();
        employeeIdentityBO.setIdentityType(employeeIdentity.getIdentityType());
        employeeIdentityBO.setIdentityId(employeeIdentity.getIdentityId());

        return employeeIdentityBO;
    }

}
